package com.dhcc.logs.listener;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.EventListener;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

import com.alibaba.fastjson.JSON;
import com.dhcc.logs.common.event.UserEvent;
import com.dhcc.logs.controller.DemoController;
import com.dhcc.logs.entity.User;

/**
 * 
* <p>标题: UserEventListener.java</p>
* <p>业务描述:健康管理平台</p>
* <p>公司:东华软件股份公司</p>
* <p>版权:dhcc2013</p>
* @author 胡凯
* @date 2019年10月11日
* @version V1.0
 */
@Component
public class UserEventListenerTwo implements ApplicationListener<UserEvent>{
	private static final Logger log = LoggerFactory.getLogger(UserEventListenerTwo.class);

	@Async
	@Override
	public void onApplicationEvent(UserEvent event) {
		log.info(JSON.toJSONString(event));
	}
}